home *** CD-ROM | disk | FTP | other *** search
/ c't freeware shareware 2001 January / CT_SW0101.ISO / pc / software / kommunik / multimed / snakcarb.sit / Snak 4.6.3 Carbon / Scripts / RepeatingMessage < prev    next >
Text File  |  2000-05-02  |  1KB  |  43 lines

  1. # Lines with '#' are comments that are not executed
  2.  
  3. # This file contains an example of how to add additional functionality to Snak. 
  4. # This example shows how to periodically send a message to a the channel.
  5.  
  6. # To automatically load this into a connection, add "/load repeatingmessage" to the startup actions
  7.  
  8. # The repeating message can be turned on and off
  9.  
  10. # This flag turns the message on and off
  11. assign do_repeatingmessage_flag Y
  12.  
  13.  
  14. # This is the alias that is run every 5 seconds as long as the flag is on.
  15. # It outputs a message "hello" and then starts a timer that 5 seconds later will 
  16. # run the alias again. 
  17.  
  18. # The "echo hello" only displays the text locally. This lets you experiment
  19. # without annoying other people in the channel. 
  20.  
  21. # When you are ready, replace the "echo" with "say" to really send the text to the channel.
  22.  
  23. alias repeatingmessage {
  24.  
  25.     if ([$do_repeatingmessage_flag] == [Y]) {
  26.         echo hello
  27.         timer 5 repeatingmessage
  28.     }
  29. }
  30.  
  31. # These aliases start and stop the repeating message by setting the flag to Y or N
  32. # The ^ in front of the assign makes it "silent"
  33.  
  34. alias StartRepeatingMessage {
  35.     ^assign do_repeatingmessage_flag Y
  36.     repeatingmessage
  37. }
  38.  
  39.  
  40. alias StopRepeatingMessage {
  41.     ^assign do_repeatingmessage_flag N
  42. }
  43.